import Vue from 'vue'
import Router from 'vue-router'
import Main from '@/components/main'
import Department from '@/components/department'
import Person from '@/components/person'
import All from '@/components/all'
import Detail from '@/components/allDetails'
import Kong from '@/components/kong'
import Login from '@/components/login'
import JiXiaoAll from '@/components/jiXiaoAll'
import Income from '@/components/income'
import SectionAnalysis from '@/components/sectionAnalysis'
import SectionHospital from '@/components/sectionHospital'
import SectionService from '@/components/sectionService'
import DepartmentJixiao from '@/components/detail/departmentJixiao'
import IncomeJixiao from '@/components/detail/incomeJixiao'
import YewuJixiao from '@/components/detail/yewuJixiao'
import preview from '@/components/preview'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'main',
      component: Main,
      children: [
      		{
		      path: '/all',
		      name: 'all',
		      component: All
		    },
		    {
		      path: '/department',
		      name: 'department',
		      component: Department
		    },
		    {
		      path: '/kong',
		      name: 'kong',
		      component: Kong
		    },
		    {
		      path: '/person',
		      name: 'person',
		      component: Person
		    },
		    {
		   		path: '/detail/:type',
		   		name: 'detail',
		   		component: Detail
		    },
		    {
		   		path: '/jixiaoall',
		   		name: 'jixiaoall',
		   		component: JiXiaoAll
		    },
		    {
		   		path: '/income',
		   		name: 'income',
		   		component: Income
		    },
		    {
		   		path: '/section-analysis/:id',
		   		name: 'sectionAnalysis',
		   		component: SectionAnalysis
		    },
		    {
		   		path: '/section-hospital/:id',
		   		name: 'sectionHospital',
		   		component: SectionHospital
		    },
		    {
		   		path: '/section-service/:id',
		   		name: 'sectionService',
		   		component: SectionService
		    },
		    {
		   		path: '/d-jixiao/:type',
		   		name: 'departmentJixiao',
		   		component: DepartmentJixiao
		    },
		    {
		   		path: '/i-jixiao/:type',
		   		name: 'incomeJixiao',
		   		component: IncomeJixiao
		    },
		    {
		   		path: '/y-jixiao/:type',
		   		name: 'yewuJixiao',
		   		component: YewuJixiao
		    }
      ]
    },
    {
    	path: '/login',
    	name: 'login',
    	component: Login
    },
    {
        path: '/preview/:id',
        name: 'preview',
        component: preview
    } 
  ]
})